<template>
     <div class="comments">
        <div class="top">
            <h2>预约挂号</h2>
            <div class="topright">
                <div class="import">导入</div>
                <div class="out">导出</div>
            </div>
        </div>
        <div class="allnumber">
            <div class="alltop">
                <div class="select">
                    <el-radio v-model="radio" label="1">全部</el-radio>
                    <el-radio v-model="radio" label="2">待就诊</el-radio>
                    <el-radio v-model="radio" label="3">已就诊</el-radio>
                    <el-radio v-model="radio" label="4">已取消</el-radio>
                </div>
                <div class="block">
                    <el-date-picker v-model="value1" type="daterange" range-separator="～" start-placeholder="请选择日期"  end-placeholder="请选择日期">
                    </el-date-picker>
                </div>
                <div class="selecthome">
                    <el-cascader :options="options" clearable></el-cascader>
                </div>
                <div class="selectblue">
                    <input type="text" placeholder="请输入医生/病人姓名">
                    <div class="button">搜索</div>
                </div>
            </div>
            <div class="alltable">
                <el-table
                    ref="multipleTable"
                    :data="tableData"
                    tooltip-effect="dark"
                    style="width: 100%"
                    @selection-change="handleSelectionChange">
                    <el-table-column
                    type="selection"
                    width="50">
                    </el-table-column>
                    <el-table-column
                     prop="name"
                    label="患者姓名"
                    width="70">
                    </el-table-column>
                    <el-table-column
                    prop="card"
                    label="就诊卡号"
                    width="90">
                    </el-table-column>
                    <el-table-column
                    prop="bodycard"
                    label="身份证号"
                    width="145">
                    </el-table-column>
                    <el-table-column
                    prop="phone"
                    label="手机号码"
                    width="80">
                    </el-table-column>
                    <el-table-column
                    prop="home"
                    label="挂诊科室"
                    width="90">
                    </el-table-column>
                    <el-table-column
                    prop="sort"
                    label="挂号类型"
                    width="70">
                    </el-table-column>
                    <el-table-column
                    prop="price"
                    label="挂号费"
                    width="65">
                    </el-table-column>
                    <el-table-column
                    prop="status"
                    label="挂号状态"
                    width="80">
                    </el-table-column>
                    <el-table-column
                    prop="getdate"
                    label="就诊日期"
                    width="80">
                    </el-table-column>
                    <el-table-column
                    prop="gettime"
                    label="就诊时间"
                    width="70">
                    </el-table-column>
                    <el-table-column
                    prop="time"
                    label="预约时间"
                    width="100">
                    </el-table-column>
                    <el-table-column  prop="imgs" label="操作" width="80">
                        <template slot-scope="scope">
                            <i @click="numberDetail" class="book el-icon-s-order"></i>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
            <div class="allpage">
              <Pages></Pages>
            </div>
        </div>

    
    </div>
</template>
  
  <script>
import Pages from '@/components/Pages.vue';

  
  export default {
    name: 'NumberView',
    components:{Pages},
    data () {
      return {
        tableData: [{
            name: 'xxx',
            card:5000909000,
            bodycard:371890199507070909,
            phone: 190000678123,
            home:'内科-肾内科',
            sort:'专家号',
            price:60.00,
            status:'已就诊',
            getdate: '2016-05-03',
            gettime:'9:30',
            time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }, 
        {
          name: 'xxx',
          card:5000909000,
          bodycard:371890199507070909,
          phone: 190000678123,
          home:'内科-肾内科',
          sort:'专家号',
          price:60.00,
          status:'已就诊',
          getdate: '2016-05-03',
          gettime:'9:30',
          time:'2019-08-15 14:02:26'
        }
    ],
        multipleSelection: [],
        radio: '4',
        shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }],
        value1: '',
        options: [{
          value: 'zhinan',
          label: '指南',
          children: [{
            value: 'shejiyuanze',
            label: '设计原则',
            children: [{
              value: 'yizhi',
              label: '一致'
            }, {
              value: 'fankui',
              label: '反馈'
            }, {
              value: 'xiaolv',
              label: '效率'
            }, {
              value: 'kekong',
              label: '可控'
            }]
          }, {
            value: 'daohang',
            label: '导航',
            children: [{
              value: 'cexiangdaohang',
              label: '侧向导航'
            }, {
              value: 'dingbudaohang',
              label: '顶部导航'
            }]
          }]
        }, {
          value: 'zujian',
          label: '组件',
          children: [{
            value: 'basic',
            label: 'Basic',
            children: [{
              value: 'layout',
              label: 'Layout 布局'
            }, {
              value: 'color',
              label: 'Color 色彩'
            }, {
              value: 'typography',
              label: 'Typography 字体'
            }, {
              value: 'icon',
              label: 'Icon 图标'
            }, {
              value: 'button',
              label: 'Button 按钮'
            }]
          }, {
            value: 'form',
            label: 'Form',
            children: [{
              value: 'radio',
              label: 'Radio 单选框'
            }, {
              value: 'checkbox',
              label: 'Checkbox 多选框'
            }, {
              value: 'input',
              label: 'Input 输入框'
            }, {
              value: 'input-number',
              label: 'InputNumber 计数器'
            }, {
              value: 'select',
              label: 'Select 选择器'
            }, {
              value: 'cascader',
              label: 'Cascader 级联选择器'
            }, {
              value: 'switch',
              label: 'Switch 开关'
            }, {
              value: 'slider',
              label: 'Slider 滑块'
            }, {
              value: 'time-picker',
              label: 'TimePicker 时间选择器'
            }, {
              value: 'date-picker',
              label: 'DatePicker 日期选择器'
            }, {
              value: 'datetime-picker',
              label: 'DateTimePicker 日期时间选择器'
            }, {
              value: 'upload',
              label: 'Upload 上传'
            }, {
              value: 'rate',
              label: 'Rate 评分'
            }, {
              value: 'form',
              label: 'Form 表单'
            }]
          }, {
            value: 'data',
            label: 'Data',
            children: [{
              value: 'table',
              label: 'Table 表格'
            }, {
              value: 'tag',
              label: 'Tag 标签'
            }, {
              value: 'progress',
              label: 'Progress 进度条'
            }, {
              value: 'tree',
              label: 'Tree 树形控件'
            }, {
              value: 'pagination',
              label: 'Pagination 分页'
            }, {
              value: 'badge',
              label: 'Badge 标记'
            }]
          }, {
            value: 'notice',
            label: 'Notice',
            children: [{
              value: 'alert',
              label: 'Alert 警告'
            }, {
              value: 'loading',
              label: 'Loading 加载'
            }, {
              value: 'message',
              label: 'Message 消息提示'
            }, {
              value: 'message-box',
              label: 'MessageBox 弹框'
            }, {
              value: 'notification',
              label: 'Notification 通知'
            }]
          }, {
            value: 'navigation',
            label: 'Navigation',
            children: [{
              value: 'menu',
              label: 'NavMenu 导航菜单'
            }, {
              value: 'tabs',
              label: 'Tabs 标签页'
            }, {
              value: 'breadcrumb',
              label: 'Breadcrumb 面包屑'
            }, {
              value: 'dropdown',
              label: 'Dropdown 下拉菜单'
            }, {
              value: 'steps',
              label: 'Steps 步骤条'
            }]
          }, {
            value: 'others',
            label: 'Others',
            children: [{
              value: 'dialog',
              label: 'Dialog 对话框'
            }, {
              value: 'tooltip',
              label: 'Tooltip 文字提示'
            }, {
              value: 'popover',
              label: 'Popover 弹出框'
            }, {
              value: 'card',
              label: 'Card 卡片'
            }, {
              value: 'carousel',
              label: 'Carousel 走马灯'
            }, {
              value: 'collapse',
              label: 'Collapse 折叠面板'
            }]
          }]
        }, {
          value: 'ziyuan',
          label: '资源',
          children: [{
            value: 'axure',
            label: 'Axure Components'
          }, {
            value: 'sketch',
            label: 'Sketch Templates'
          }, {
            value: 'jiaohu',
            label: '组件交互文档'
          }]
        }]
      };
    },
    methods: {
      handleSelectionChange(val) {
       this.multipleSelection = val;
     },
      numberDetail(){
        if(this.$route.name!='numberdetail'){
          this.$router.push('/numberdetail')
        }    
      },
     
    }
  }
  </script>
  
  <!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .coments{
    padding: 0 0 0 10px;
    box-sizing: border-box;
  }
  .top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
h2{
    height: 30px;
    line-height: 30px;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    margin-left: 30px;
}
h2::after{
    content: '';
    border-width: 0px;
    position: absolute;
    left: 0px;
    top:12px;
    width: 24px;
    height: 8px;
    border-radius: 10px;
    background-color: #006EFF;
}
.topright{
    display: flex;
}
.import,.out{
    background-color: rgba(0, 110, 255, 0.0980392156862745);
    border: none;
    border-radius: 4px;
    box-shadow: none;
    font-weight: 400;
    font-size: 14px;
    font-style: normal;
    letter-spacing: 1px;
    color: #006EFF;
    padding: 8px 18px;
    box-sizing: border-box;
    margin-left: 20px;
}
.import:hover,.out:hover{
    background-color: #4e7dff;
    color: #fff;
}
.allnumber{
    width: 100%;
    /* height: 781px; */
    background: inherit;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 8px;
    box-shadow: 0px 0px 20px rgba(215, 215, 215, 1);
    margin-top: 20px;
    padding: 15px;
    box-sizing: border-box;
}
.alltop{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin:0 0 20px;
}
.el-radio__label {
    padding-left: 5px;
}
.el-radio {
    color: #606266;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    outline: 0;
    margin-right: 15px;
}
.el-date-editor--daterange.el-input__inner{
    width:260px;
}
.block{
    position: relative;
}
/* .el-picker-panel {
    position: absolute;
    top: 175px;
    left: 531px;
    transform-origin: center top;
    z-index: 2001;
} */
.selecthome{
    width: 160px;
}
.selectblue{
    display: flex;
}
.selectblue input{
    width: 260px;
    height: 40px;
    outline: none;
    border-color: #409EFF;
    border: 1px solid #DCDFE6;
    border-radius: 8px;
    font-size: 14px;
    color: #606266;
    opacity: .6;
}
.selectblue input:focus {
        background-color: #ffffff; 
        border-color: #007bff; 
        outline: none; 
    }
.button{
    padding:10px 13px;
    box-sizing: border-box;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    background-color: rgba(0, 110, 255, 1);
    margin-left: 10px;
}
.allpage{
    display: flex;
    justify-content: end;
    padding-top: 20px;
    box-sizing: border-box;
}
.el-table thead {
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    color: #999999;
}
.el-table {
    font-size: 12px;
    color: #606266;
}
.book{
    font-size: 25px;
    color: #3b70ff;
}
::v-deep .el-table th.el-table__cell>.cell{
  padding-left: 14px;
}
</style>